-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename rank(A::GrpAbFinGen) to torsion_free_rank #1224
Conversation
e5cb900
to
5727962
Compare
Outside of group theory the torsion free rank is common. |
Since I really want rank to land in Oscar, I am also in favor of this. It is quite disrupting though. I will discuss it with C. from K. |
5727962
to
5c4e71a
Compare
Just talked with @fieker about this and other people in KL. Thoughts from Claus
(If we use two names, ideally each docstring would also point to the other one to help users). Another suggestion
|
Another option Claus mentioned a while ago was "remove |
I am not sure what "remove rank for abelian groups" means. Let |
If |
5c4e71a
to
e83c5f8
Compare
e83c5f8
to
937fb78
Compare
Maybe it is too late for 1.0, but I still would like to get this in eventually -- I just stumbled over this again when dealing with free groups and not being able to just do (of course I could implement it on free groups as both definitions agree there, but then I'd be in a situation where I'd have to reject most other groups with an error ... or maybe I could just reject abelian groups and say "this is ambiguous" or so... Ugh) |
937fb78
to
e5c4887
Compare
Hm, should it error or return the minimal generating set size as promised by the docstring? |
See also [`torsion_free_rank`](@ref). | ||
""" | ||
rank(A::FinGenAbGroup) = error("rank(::FinGenAbGroup) has been renamed to torsion_free_rank") | ||
#rank(A::FinGenAbGroup) = is_snf(A) ? length(A.snf) : return rank(snf(A)[1]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am happy to activate the second method. The one concern I have is that existing code may silently break if we change the meaning of rank
immediately. With this error I was hoping to catch at least errors in the Hecke and OscarCI test suites cased by this. We can of course change it before merging.
It already chatched some errors in Oscar. See https://github.com/thofma/Hecke.jl/actions/runs/8047209417/job/21976054087?pr=1224#step:7:322
All of this should thus probably go into a breaking Hecke release. As this is just re-exported in Oscar, that would be a breaking change of Oscar as well, e.g. it needs to go into 1.0 or wait for 2.0. And the CI verifies that it is indeed breaking |
The error seems to be in
Since That said, of course this is a breaking change as we change the behavior of the documented & exported function |
So how shall we proceed? I can turn Or perhaps we first make a change in Oscar.jl to make just
(Just grepping for |
Yes, we can do that. But still the question is whether we have enough time to change |
... to torsion_free_rank(A::FinGenAbGroup), see also <thofma/Hecke.jl#1224>.
My understanding is that we do have the time, but in the end the release managers should decide. I'll open a PR at Oscar.jl and explain / ask about it. |
P.S.: I am actually surprised, that there are so few |
... to torsion_free_rank(A::FinGenAbGroup), see also <thofma/Hecke.jl#1224>.
Unfortunately the notion of 'rank' for groups clashes with that for abelian groups. The latter is also known as 'torsion free rank'. Hence I propose to rename `rank` for abelian groups here accordingly.
e5c4887
to
bf86fb2
Compare
Rebased |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #1224 +/- ##
==========================================
+ Coverage 70.81% 70.85% +0.03%
==========================================
Files 351 351
Lines 111970 111973 +3
==========================================
+ Hits 79287 79333 +46
+ Misses 32683 32640 -43
|
Thank you @thofma for working on both PRs. Let's hope it passes now |
…A::FinGenAbGroup)` (#3457) * Prepare for renaming of rank(A::FinGenAbGroup) ... to torsion_free_rank(A::FinGenAbGroup), see also <thofma/Hecke.jl#1224>. * Use is_z_graded in _regularity_bound * more rank -> torsion_free_rank * more * more more * Update experimental/GModule/Cohomology.jl * more more more * bump Hecke --------- Co-authored-by: Tommy Hofmann <[email protected]> Co-authored-by: Lars Göttgens <[email protected]>
…A::FinGenAbGroup)` (#3457) * Prepare for renaming of rank(A::FinGenAbGroup) ... to torsion_free_rank(A::FinGenAbGroup), see also <thofma/Hecke.jl#1224>. * Use is_z_graded in _regularity_bound * more rank -> torsion_free_rank * more * more more * Update experimental/GModule/Cohomology.jl * more more more * bump Hecke --------- Co-authored-by: Tommy Hofmann <[email protected]> Co-authored-by: Lars Göttgens <[email protected]> (cherry picked from commit 8b863ed)
Unfortunately the notion of 'rank' for groups clashes with that for abelian groups. The latter is also known as 'torsion free rank'. Hence I propose to rename `rank` for abelian groups here accordingly.
Unfortunately the notion of 'rank' for groups clashes with that for abelian groups. The latter is also known as 'torsion free rank'. Hence I propose to rename
rank
for abelian groups here accordingly; in my experience (which obviously is colored by my background) there are much more places that use the former meaning ofrank
(minimal size of a generating set) than the latter ("torsion free rank").The alternative would be to rename
rank
for groups, but I am not aware of any synonyms, so it'd probably need to be something artificial (group_rank
?size_of_minimal_generating_set
?)There are probably some callers that need to be adjusted in here and in Oscar, but I didn't bother with trying to find them, first I would like to clear if there is even a chance of us applying this change or not :-).
CC @ThomasBreuer @fieker @thofma